﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SalePartial.BLL.SAServiceRef;
using SalePartial.BLL;
using Telerik.Web.UI;
using System.Drawing;


public partial class SAClientWeb_DownLoadFrm : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Guid familyId;
            if (HttpContext.Current.Session["familyId"] != null)
            {
                familyId = new Guid(HttpContext.Current.Session["familyId"].ToString());

                FamilyDetailFrm_Load(familyId);
            }
            else
            {
                SABLL.ShowInfoMsg(this, @"无法查看，请在零件列表中至少选中一个零件！");
                return;
            }

        }
    }
    private void FamilyDetailFrm_Load(Guid familyId)
    {
        //get data.
        FamilyInfo m_familyInfo = SABLL.GetFamilyInfo(familyId);

        FamilyAttrInfo familyAttr = SABLL.GetFamilyAttrInfo(m_familyInfo.ID);
        textBox_filename.Text = m_familyInfo.Name;

    }

    private bool CheckInput()
    {
        if (String.IsNullOrEmpty(this.textBox_filename.Text))
        {
            SABLL.ShowInfoMsg(this,@"文件名不能为空！");
            return false;
        }

        return true;
    }

    protected void button_ok_Click(object sender, EventArgs e)
    {
        if (this.CheckInput())
        {
          //  m_finalPath = System.IO.Path.Combine(this.textBox_path.Text, String.Format("{0}.{1}", this.textBox_filename.Text, this.comboBox_filetype.Text.ToLower()));
        }

    }

}